/*
 * author      : 吴中勤 
 * date        : 2018/8/19
 * description : bp通用响应
 */

package com.deepexi.adapter.sdk.sap.dto.bp;

import com.deepexi.adapter.common.BaseDto;
import com.deepexi.adapter.sdk.sap.SapBizConst;
import com.deepexi.adapter.sdk.sap.dto.SapBaseResponse;
import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

public class SapBPResponseBody extends SapBaseResponse {

//    @SerializedName("SUBRC")
//    private String code;
//
//    @SerializedName("MESSAGE")
//    private String msg;

    @SerializedName("Items")
    private List<BPOutputVO> BPItems;

    public boolean isOk() {
        return null == code || SapBizConst.RESPONSE_SUBRC_OK.equals(code);
    }

    // setter getter

    public SapBPResponseBody addBPItem(BPOutputVO aBPItem) {
        if (null == BPItems) {
            BPItems = new ArrayList<>();
        }
        BPItems.add(aBPItem);
        return this;
    }


    public List<BPOutputVO> getBPItems() {
        return BPItems;
    }

    public void setBPItems(List<BPOutputVO> BPItems) {
        this.BPItems = BPItems;
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
